<template>
	<view class="page">
		<image :src="src" mode="" class="img"  mode="widthFix"></image>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type:"",
				src:'',
				height:''
			}
		},
		onLoad(option) {
			
			this.type = option.type;
			
			if(this.type == 1) {
				wx.setNavigationBarTitle({
				  title: '书展介绍' 
				})
			} 
			if(this.type == 2) {
				wx.setNavigationBarTitle({
				  title: '展区设计' 
				})
			} 
			this.render();
		},
		methods: {
			async render(){
				const res = await this.$http({
					url:'api/index/zhq',
					method:"post",
					data:{}
				})
				console.log(res);
				if(this.type == 1) {
					this.src = res.data.zh
					this.height = '1472rpx'
				} 
				if(this.type == 2) {
					this.src = res.data.zq;
					this.height = '2638rpx'
				} 
			}
		}
	}
</script>

<style scoped>
	.page {
		width: 100%;
		height: 100%;
	}
   .img {
	   width: 100%;
	   height: 1472rpx;
   }
</style>
